package com.frame.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropUtil {
    private static Properties properties;
    public static String getProperty(String key){
        if (properties==null){
            try {
                InputStream is=Thread.currentThread().getContextClassLoader().getResourceAsStream("frame.properties");
                properties = new Properties();
                properties.load(is);
            }catch (IOException e){
                e.printStackTrace();
            }
        }
        return properties.getProperty(key);
    }
}
